home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / rprint_1 / msflexsa.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-08-04  |  11.7 KB  |  370 lines

  1. VERSION 5.00
  2. Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
  3. Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
  4. Begin VB.Form MsFlexSample 
  5.    BackColor       =   &H00FFFFFF&
  6.    Caption         =   "MsFlexSample"
  7.    ClientHeight    =   6960
  8.    ClientLeft      =   60
  9.    ClientTop       =   1050
  10.    ClientWidth     =   11865
  11.    LinkTopic       =   "Form1"
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   6960
  14.    ScaleWidth      =   11865
  15.    WindowState     =   2  'Maximized
  16.    Begin VB.TextBox Text1 
  17.       BeginProperty Font 
  18.          Name            =   "MS Sans Serif"
  19.          Size            =   9.75
  20.          Charset         =   177
  21.          Weight          =   700
  22.          Underline       =   0   'False
  23.          Italic          =   0   'False
  24.          Strikethrough   =   0   'False
  25.       EndProperty
  26.       Height          =   495
  27.       Left            =   15
  28.       MultiLine       =   -1  'True
  29.       TabIndex        =   0
  30.       Text            =   "MsFlexSample.frx":0000
  31.       Top             =   1350
  32.       Visible         =   0   'False
  33.       Width           =   9555
  34.    End
  35.    Begin VB.CommandButton Command2 
  36.       BackColor       =   &H00FFFFFF&
  37.       Caption         =   "Close"
  38.       Height          =   345
  39.       Left            =   8445
  40.       Style           =   1  'Graphical
  41.       TabIndex        =   11
  42.       Top             =   180
  43.       Width           =   810
  44.    End
  45.    Begin MSMask.MaskEdBox MaskEd 
  46.       Height          =   315
  47.       Left            =   7800
  48.       TabIndex        =   10
  49.       Top             =   960
  50.       Width           =   1755
  51.       _ExtentX        =   3096
  52.       _ExtentY        =   556
  53.       _Version        =   393216
  54.       BorderStyle     =   0
  55.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  56.          Name            =   "MS Sans Serif"
  57.          Size            =   9.75
  58.          Charset         =   177
  59.          Weight          =   700
  60.          Underline       =   0   'False
  61.          Italic          =   0   'False
  62.          Strikethrough   =   0   'False
  63.       EndProperty
  64.       Format          =   "dd/mm/yy"
  65.       PromptChar      =   "_"
  66.    End
  67.    Begin VB.Frame Frame1 
  68.       BackColor       =   &H00FFFFFF&
  69.       Height          =   660
  70.       Left            =   900
  71.       TabIndex        =   4
  72.       Tag             =   "noprint"
  73.       Top             =   5130
  74.       Width           =   6060
  75.       Begin VB.Label Label3 
  76.          BackColor       =   &H8000000E&
  77.          Caption         =   "Quantity"
  78.          BeginProperty Font 
  79.             Name            =   "MS Sans Serif"
  80.             Size            =   12
  81.             Charset         =   177
  82.             Weight          =   700
  83.             Underline       =   0   'False
  84.             Italic          =   0   'False
  85.             Strikethrough   =   0   'False
  86.          EndProperty
  87.          ForeColor       =   &H00800080&
  88.          Height          =   360
  89.          Left            =   90
  90.          TabIndex        =   8
  91.          Top             =   240
  92.          Width           =   1305
  93.       End
  94.       Begin VB.Label Label1 
  95.          BackColor       =   &H00FFFFFF&
  96.          Caption         =   "Amount"
  97.          BeginProperty Font 
  98.             Name            =   "MS Sans Serif"
  99.             Size            =   12
  100.             Charset         =   177
  101.             Weight          =   700
  102.             Underline       =   0   'False
  103.             Italic          =   0   'False
  104.             Strikethrough   =   0   'False
  105.          EndProperty
  106.          ForeColor       =   &H000000C0&
  107.          Height          =   390
  108.          Left            =   3030
  109.          TabIndex        =   7
  110.          Top             =   240
  111.          Width           =   1005
  112.       End
  113.       Begin VB.Label Label2 
  114.          Alignment       =   2  'Center
  115.          BackColor       =   &H00FF0000&
  116.          Caption         =   "$ 0.00"
  117.          BeginProperty Font 
  118.             Name            =   "MS Sans Serif"
  119.             Size            =   12
  120.             Charset         =   177
  121.             Weight          =   700
  122.             Underline       =   -1  'True
  123.             Italic          =   0   'False
  124.             Strikethrough   =   0   'False
  125.          EndProperty
  126.          ForeColor       =   &H00FFFFFF&
  127.          Height          =   375
  128.          Left            =   4200
  129.          TabIndex        =   6
  130.          Top             =   240
  131.          Width           =   1335
  132.       End
  133.       Begin VB.Label Label4 
  134.          Alignment       =   2  'Center
  135.          Appearance      =   0  'Flat
  136.          BackColor       =   &H80000005&
  137.          BorderStyle     =   1  'Fixed Single
  138.          Caption         =   "6"
  139.          BeginProperty Font 
  140.             Name            =   "MS Sans Serif"
  141.             Size            =   12
  142.             Charset         =   177
  143.             Weight          =   700
  144.             Underline       =   0   'False
  145.             Italic          =   0   'False
  146.             Strikethrough   =   0   'False
  147.          EndProperty
  148.          ForeColor       =   &H80000008&
  149.          Height          =   375
  150.          Left            =   1425
  151.          TabIndex        =   5
  152.          Top             =   240
  153.          Width           =   1335
  154.       End
  155.    End
  156.    Begin VB.CommandButton Command1 
  157.       BackColor       =   &H00FFFFFF&
  158.       Caption         =   "Click to Invoice Style"
  159.       BeginProperty Font 
  160.          Name            =   "MS Sans Serif"
  161.          Size            =   9.75
  162.          Charset         =   177
  163.          Weight          =   700
  164.          Underline       =   0   'False
  165.          Italic          =   0   'False
  166.          Strikethrough   =   0   'False
  167.       EndProperty
  168.       Height          =   408
  169.       Left            =   3840
  170.       Style           =   1  'Graphical
  171.       TabIndex        =   3
  172.       Top             =   960
  173.       Width           =   3180
  174.    End
  175.    Begin MSFlexGridLib.MSFlexGrid MSFlex 
  176.       Bindings        =   "MsFlexSample.frx":0540
  177.       Height          =   3315
  178.       Left            =   360
  179.       TabIndex        =   1
  180.       Top             =   1815
  181.       Width           =   7995
  182.       _ExtentX        =   14102
  183.       _ExtentY        =   5847
  184.       _Version        =   393216
  185.       Rows            =   15
  186.       Cols            =   4
  187.       FixedCols       =   0
  188.       ForeColorFixed  =   16711680
  189.       BackColorBkg    =   16777215
  190.       AllowUserResizing=   3
  191.    End
  192.    Begin VB.Data Data1 
  193.       Caption         =   "Data1"
  194.       Connect         =   "Access"
  195.       DatabaseName    =   "Publish.mdb"
  196.       DefaultCursorType=   0  'DefaultCursor
  197.       DefaultType     =   2  'UseODBC
  198.       Exclusive       =   0   'False
  199.       Height          =   345
  200.       Left            =   4170
  201.       Options         =   0
  202.       ReadOnly        =   0   'False
  203.       RecordsetType   =   1  'Dynaset
  204.       RecordSource    =   "Customers"
  205.       Top             =   3630
  206.       Width           =   1692
  207.    End
  208.    Begin VB.PictureBox Picture1 
  209.       Appearance      =   0  'Flat
  210.       BackColor       =   &H80000005&
  211.       BorderStyle     =   0  'None
  212.       ForeColor       =   &H80000008&
  213.       Height          =   1290
  214.       Left            =   360
  215.       Picture         =   "MsFlexSample.frx":0554
  216.       ScaleHeight     =   1290
  217.       ScaleWidth      =   3465
  218.       TabIndex        =   2
  219.       Top             =   120
  220.       Width           =   3465
  221.    End
  222.    Begin VB.Label Label6 
  223.       Alignment       =   2  'Center
  224.       BackStyle       =   0  'Transparent
  225.       Caption         =   "MsFlexGrid Data Bound And Unbound"
  226.       BeginProperty Font 
  227.          Name            =   "Arial"
  228.          Size            =   9.75
  229.          Charset         =   177
  230.          Weight          =   700
  231.          Underline       =   0   'False
  232.          Italic          =   0   'False
  233.          Strikethrough   =   0   'False
  234.       EndProperty
  235.       Height          =   675
  236.       Left            =   4725
  237.       TabIndex        =   12
  238.       Top             =   165
  239.       Width           =   2160
  240.    End
  241.    Begin VB.Label Label5 
  242.       Alignment       =   2  'Center
  243.       BackColor       =   &H00FFFFFF&
  244.       Caption         =   "Printing MSFlexGrid with RoboPrint"
  245.       BeginProperty Font 
  246.          Name            =   "MS Sans Serif"
  247.          Size            =   13.5
  248.          Charset         =   177
  249.          Weight          =   700
  250.          Underline       =   0   'False
  251.          Italic          =   0   'False
  252.          Strikethrough   =   0   'False
  253.       EndProperty
  254.       ForeColor       =   &H000000C0&
  255.       Height          =   345
  256.       Left            =   360
  257.       TabIndex        =   9
  258.       Top             =   1425
  259.       Width           =   6810
  260.    End
  261.    Begin VB.Shape Shape2 
  262.       BackColor       =   &H000000FF&
  263.       BackStyle       =   1  'Opaque
  264.       FillStyle       =   5  'Downward Diagonal
  265.       Height          =   240
  266.       Left            =   8070
  267.       Shape           =   2  'Oval
  268.       Top             =   6015
  269.       Width           =   210
  270.    End
  271.    Begin VB.Shape Shape1 
  272.       BackColor       =   &H000000FF&
  273.       BackStyle       =   1  'Opaque
  274.       FillStyle       =   4  'Upward Diagonal
  275.       Height          =   270
  276.       Left            =   315
  277.       Shape           =   2  'Oval
  278.       Top             =   5985
  279.       Width           =   210
  280.    End
  281.    Begin VB.Line Line1 
  282.       BorderWidth     =   3
  283.       X1              =   630
  284.       X2              =   7845
  285.       Y1              =   6135
  286.       Y2              =   6135
  287.    End
  288. Attribute VB_Name = "MsFlexSample"
  289. Attribute VB_GlobalNameSpace = False
  290. Attribute VB_Creatable = False
  291. Attribute VB_PredeclaredId = True
  292. Attribute VB_Exposed = False
  293. Private Sub Command1_Click()
  294. Static Style As Boolean
  295. Style = Not Style
  296. If Style Then
  297. Command1.Caption = "Click to Recordset Style"
  298. Invoice
  299. Frame1.Tag = ""
  300. Text1.Visible = True
  301. Label5.Visible = False
  302. MSFlex.WordWrap = True
  303. Command1.Caption = "Click to Invoice Style"
  304. DTSource
  305. Frame1.Tag = "noprint"
  306. Text1.Visible = False
  307. Label5.Visible = True
  308. MSFlex.WordWrap = False
  309. End If
  310. End Sub
  311. Private Sub Command2_Click()
  312. Unload Me
  313. End Sub
  314. Private Sub Form_Load()
  315. 'MaskEd = Format(Now, "dd/mm/yy")
  316. Data1.DatabaseName = App.Path & "\Publish.mdb"
  317. Invoice
  318. End Sub
  319. Private Sub DTSource()
  320. MSFlex.Redraw = True
  321. Data1.Refresh
  322. MSFlex.Refresh
  323. End Sub
  324. Public Sub Invoice()
  325. MSFlex.Clear
  326. MSFlex.Rows = 10
  327. MSFlex.Cols = 4
  328. MSFlex.ColWidth(0) = 2100
  329. MSFlex.TextMatrix(0, 0) = "Product"
  330. MSFlex.ColAlignment(0) = 3
  331. MSFlex.ColWidth(1) = 1600
  332. MSFlex.ColAlignment(1) = 4
  333. MSFlex.TextMatrix(0, 1) = "Units"
  334. MSFlex.ColAlignment(2) = 5
  335. MSFlex.ColWidth(2) = 1700
  336. MSFlex.TextMatrix(0, 2) = "Price"
  337. MSFlex.ColAlignment(3) = 6
  338. MSFlex.ColWidth(1) = 1100
  339. MSFlex.TextMatrix(0, 3) = "Total"
  340. MSFlex.RowHeight(2) = 400
  341. MSFlex.RowHeight(1) = 1100
  342. MSFlex.TextMatrix(1, 0) = "RoboPrint.Ocx Evaluation Version"
  343. MSFlex.Col = 0
  344. MSFlex.Row = 1
  345. MSFlex.CellBackColor = &HFFFF&
  346. MSFlex.CellFontSize = 12
  347. MSFlex.TextMatrix(2, 0) = "Sample Project"
  348. MSFlex.TextMatrix(3, 0) = "MsFlexSample Form"
  349. MSFlex.TextMatrix(4, 0) = "Sample Project"
  350. MSFlex.TextMatrix(1, 1) = "1.00"
  351. MSFlex.TextMatrix(1, 2) = "0.00"
  352. MSFlex.TextMatrix(1, 3) = "0.00"
  353. MSFlex.TextMatrix(2, 1) = "1.00"
  354. MSFlex.TextMatrix(2, 2) = "0.00"
  355. MSFlex.TextMatrix(2, 3) = "0.00"
  356. MSFlex.TextMatrix(3, 1) = "1.00"
  357. MSFlex.TextMatrix(3, 2) = "0.00"
  358. MSFlex.TextMatrix(3, 3) = "0.00"
  359. MSFlex.TextMatrix(4, 1) = "1.00"
  360. MSFlex.TextMatrix(4, 2) = "0.00"
  361. MSFlex.TextMatrix(4, 3) = "0.00"
  362. MSFlex.TextMatrix(5, 0) = "Sample MdiForm"
  363. MSFlex.TextMatrix(5, 1) = "1.00"
  364. MSFlex.TextMatrix(5, 2) = "0.00"
  365. MSFlex.TextMatrix(5, 3) = "0.00"
  366. End Sub
  367. Private Sub Picture1_Click()
  368. Invoice
  369. End Sub
  370.